<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Box2D: b2Fixture.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="icon.gif"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Box2D
   &#160;<span id="projectnumber">2.2.1</span>
   </div>
   <div id="projectbrief">A 2D Physics Engine for Games</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">b2Fixture.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org</span>
<a name="l00003"></a>00003 <span class="comment">*</span>
<a name="l00004"></a>00004 <span class="comment">* This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00005"></a>00005 <span class="comment">* warranty.  In no event will the authors be held liable for any damages</span>
<a name="l00006"></a>00006 <span class="comment">* arising from the use of this software.</span>
<a name="l00007"></a>00007 <span class="comment">* Permission is granted to anyone to use this software for any purpose,</span>
<a name="l00008"></a>00008 <span class="comment">* including commercial applications, and to alter it and redistribute it</span>
<a name="l00009"></a>00009 <span class="comment">* freely, subject to the following restrictions:</span>
<a name="l00010"></a>00010 <span class="comment">* 1. The origin of this software must not be misrepresented; you must not</span>
<a name="l00011"></a>00011 <span class="comment">* claim that you wrote the original software. If you use this software</span>
<a name="l00012"></a>00012 <span class="comment">* in a product, an acknowledgment in the product documentation would be</span>
<a name="l00013"></a>00013 <span class="comment">* appreciated but is not required.</span>
<a name="l00014"></a>00014 <span class="comment">* 2. Altered source versions must be plainly marked as such, and must not be</span>
<a name="l00015"></a>00015 <span class="comment">* misrepresented as being the original software.</span>
<a name="l00016"></a>00016 <span class="comment">* 3. This notice may not be removed or altered from any source distribution.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef B2_FIXTURE_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define B2_FIXTURE_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;Box2D/Dynamics/b2Body.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;<a class="code" href="b2_collision_8h.html">Box2D/Collision/b2Collision.h</a>&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;Box2D/Collision/Shapes/b2Shape.h&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="classb2_block_allocator.html">b2BlockAllocator</a>;
<a name="l00027"></a>00027 <span class="keyword">class </span><a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>;
<a name="l00028"></a>00028 <span class="keyword">class </span><a class="code" href="classb2_broad_phase.html">b2BroadPhase</a>;
<a name="l00029"></a>00029 <span class="keyword">class </span><a class="code" href="classb2_fixture.html">b2Fixture</a>;
<a name="l00030"></a>00030 
<a name="l00032"></a><a class="code" href="structb2_filter.html">00032</a> <span class="keyword">struct </span><a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a>
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034         <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a>()
<a name="l00035"></a>00035         {
<a name="l00036"></a>00036                 <a class="code" href="structb2_filter.html#a368907397168d39af8b4fc5201d50bba" title="The collision category bits. Normally you would just set one bit.">categoryBits</a> = 0x0001;
<a name="l00037"></a>00037                 <a class="code" href="structb2_filter.html#a533cccf85e3ba3d9e3700d73b819f6e2">maskBits</a> = 0xFFFF;
<a name="l00038"></a>00038                 <a class="code" href="structb2_filter.html#a572a8f4a1672f6d5d71123a35e872950">groupIndex</a> = 0;
<a name="l00039"></a>00039         }
<a name="l00040"></a>00040 
<a name="l00042"></a><a class="code" href="structb2_filter.html#a368907397168d39af8b4fc5201d50bba">00042</a>         uint16 <a class="code" href="structb2_filter.html#a368907397168d39af8b4fc5201d50bba" title="The collision category bits. Normally you would just set one bit.">categoryBits</a>;
<a name="l00043"></a>00043 
<a name="l00046"></a><a class="code" href="structb2_filter.html#a533cccf85e3ba3d9e3700d73b819f6e2">00046</a>         uint16 <a class="code" href="structb2_filter.html#a533cccf85e3ba3d9e3700d73b819f6e2">maskBits</a>;
<a name="l00047"></a>00047 
<a name="l00051"></a><a class="code" href="structb2_filter.html#a572a8f4a1672f6d5d71123a35e872950">00051</a>         int16 <a class="code" href="structb2_filter.html#a572a8f4a1672f6d5d71123a35e872950">groupIndex</a>;
<a name="l00052"></a>00052 };
<a name="l00053"></a>00053 
<a name="l00056"></a><a class="code" href="structb2_fixture_def.html">00056</a> <span class="keyword">struct </span><a class="code" href="structb2_fixture_def.html">b2FixtureDef</a>
<a name="l00057"></a>00057 {
<a name="l00059"></a><a class="code" href="structb2_fixture_def.html#aa34ba06bcf0d6d981931a83cf124a602">00059</a>         <a class="code" href="structb2_fixture_def.html#aa34ba06bcf0d6d981931a83cf124a602" title="The constructor sets the default fixture definition values.">b2FixtureDef</a>()
<a name="l00060"></a>00060         {
<a name="l00061"></a>00061                 <a class="code" href="structb2_fixture_def.html#a1e41753d89abf3443e7897e2498a3240">shape</a> = NULL;
<a name="l00062"></a>00062                 <a class="code" href="structb2_fixture_def.html#a4f77ef2b2585a40899b61faf53db1093" title="Use this to store application specific fixture data.">userData</a> = NULL;
<a name="l00063"></a>00063                 <a class="code" href="structb2_fixture_def.html#a66081c8d0e12d4bdb0b341fb97b46eb6" title="The friction coefficient, usually in the range [0,1].">friction</a> = 0.2f;
<a name="l00064"></a>00064                 <a class="code" href="structb2_fixture_def.html#ad7ee26656e4749f7b548d2cc0cf9f168" title="The restitution (elasticity) usually in the range [0,1].">restitution</a> = 0.0f;
<a name="l00065"></a>00065                 <a class="code" href="structb2_fixture_def.html#a6e27d733789a35aa689af2b30a1de0ff" title="The density, usually in kg/m^2.">density</a> = 0.0f;
<a name="l00066"></a>00066                 <a class="code" href="structb2_fixture_def.html#ac8cfcc6208663c92861eaab3b3fdc57e">isSensor</a> = <span class="keyword">false</span>;
<a name="l00067"></a>00067         }
<a name="l00068"></a>00068 
<a name="l00071"></a><a class="code" href="structb2_fixture_def.html#a1e41753d89abf3443e7897e2498a3240">00071</a>         <span class="keyword">const</span> <a class="code" href="classb2_shape.html">b2Shape</a>* <a class="code" href="structb2_fixture_def.html#a1e41753d89abf3443e7897e2498a3240">shape</a>;
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="structb2_fixture_def.html#a4f77ef2b2585a40899b61faf53db1093">00074</a>         <span class="keywordtype">void</span>* <a class="code" href="structb2_fixture_def.html#a4f77ef2b2585a40899b61faf53db1093" title="Use this to store application specific fixture data.">userData</a>;
<a name="l00075"></a>00075 
<a name="l00077"></a><a class="code" href="structb2_fixture_def.html#a66081c8d0e12d4bdb0b341fb97b46eb6">00077</a>         float32 <a class="code" href="structb2_fixture_def.html#a66081c8d0e12d4bdb0b341fb97b46eb6" title="The friction coefficient, usually in the range [0,1].">friction</a>;
<a name="l00078"></a>00078 
<a name="l00080"></a><a class="code" href="structb2_fixture_def.html#ad7ee26656e4749f7b548d2cc0cf9f168">00080</a>         float32 <a class="code" href="structb2_fixture_def.html#ad7ee26656e4749f7b548d2cc0cf9f168" title="The restitution (elasticity) usually in the range [0,1].">restitution</a>;
<a name="l00081"></a>00081 
<a name="l00083"></a><a class="code" href="structb2_fixture_def.html#a6e27d733789a35aa689af2b30a1de0ff">00083</a>         float32 <a class="code" href="structb2_fixture_def.html#a6e27d733789a35aa689af2b30a1de0ff" title="The density, usually in kg/m^2.">density</a>;
<a name="l00084"></a>00084 
<a name="l00087"></a><a class="code" href="structb2_fixture_def.html#ac8cfcc6208663c92861eaab3b3fdc57e">00087</a>         <span class="keywordtype">bool</span> <a class="code" href="structb2_fixture_def.html#ac8cfcc6208663c92861eaab3b3fdc57e">isSensor</a>;
<a name="l00088"></a>00088 
<a name="l00090"></a><a class="code" href="structb2_fixture_def.html#a4c3e493a13d11ab27fcc2eee9f52fd61">00090</a>         <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a> <a class="code" href="structb2_fixture_def.html#a4c3e493a13d11ab27fcc2eee9f52fd61" title="Contact filtering data.">filter</a>;
<a name="l00091"></a>00091 };
<a name="l00092"></a>00092 
<a name="l00094"></a><a class="code" href="structb2_fixture_proxy.html">00094</a> <span class="keyword">struct </span><a class="code" href="structb2_fixture_proxy.html" title="This proxy is used internally to connect fixtures to the broad-phase.">b2FixtureProxy</a>
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096         <a class="code" href="structb2_a_a_b_b.html" title="An axis aligned bounding box.">b2AABB</a> aabb;
<a name="l00097"></a>00097         <a class="code" href="classb2_fixture.html">b2Fixture</a>* fixture;
<a name="l00098"></a>00098         int32 childIndex;
<a name="l00099"></a>00099         int32 proxyId;
<a name="l00100"></a>00100 };
<a name="l00101"></a>00101 
<a name="l00107"></a><a class="code" href="classb2_fixture.html">00107</a> <span class="keyword">class </span><a class="code" href="classb2_fixture.html">b2Fixture</a>
<a name="l00108"></a>00108 {
<a name="l00109"></a>00109 <span class="keyword">public</span>:
<a name="l00112"></a>00112         b2Shape::Type <a class="code" href="classb2_fixture.html#ab0e1d6bc1c42e6f779e77db408ab2d24">GetType</a>() <span class="keyword">const</span>;
<a name="l00113"></a>00113 
<a name="l00117"></a>00117         <a class="code" href="classb2_shape.html">b2Shape</a>* <a class="code" href="classb2_fixture.html#aaa2b73fa212fa53b1c800cccd7a1d31e">GetShape</a>();
<a name="l00118"></a>00118         <span class="keyword">const</span> <a class="code" href="classb2_shape.html">b2Shape</a>* <a class="code" href="classb2_fixture.html#aaa2b73fa212fa53b1c800cccd7a1d31e">GetShape</a>() <span class="keyword">const</span>;
<a name="l00119"></a>00119 
<a name="l00121"></a>00121         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a6198a81dcee0fe814d730383ebfa7038" title="Set if this fixture is a sensor.">SetSensor</a>(<span class="keywordtype">bool</span> sensor);
<a name="l00122"></a>00122 
<a name="l00125"></a>00125         <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#a91758c9dca818ca45f3f6427c7e3fc19">IsSensor</a>() <span class="keyword">const</span>;
<a name="l00126"></a>00126 
<a name="l00130"></a>00130         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a2c5e0d12c174927a4ad550459be334ad">SetFilterData</a>(<span class="keyword">const</span> <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a>&amp; filter);
<a name="l00131"></a>00131 
<a name="l00133"></a>00133         <span class="keyword">const</span> <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a>&amp; <a class="code" href="classb2_fixture.html#a5bc271a6e8082e727b053aead1ae86a9" title="Get the contact filtering data.">GetFilterData</a>() <span class="keyword">const</span>;
<a name="l00134"></a>00134 
<a name="l00136"></a>00136         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a45d3320f94811d67383c48466165fa26" title="Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldC...">Refilter</a>();
<a name="l00137"></a>00137 
<a name="l00140"></a>00140         <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* <a class="code" href="classb2_fixture.html#a9d6536ef274d768e86ab0a8330921535">GetBody</a>();
<a name="l00141"></a>00141         <span class="keyword">const</span> <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* <a class="code" href="classb2_fixture.html#a9d6536ef274d768e86ab0a8330921535">GetBody</a>() <span class="keyword">const</span>;
<a name="l00142"></a>00142 
<a name="l00145"></a>00145         <a class="code" href="classb2_fixture.html">b2Fixture</a>* <a class="code" href="classb2_fixture.html#a0241952461f6f1a04a3c850306390fd2">GetNext</a>();
<a name="l00146"></a>00146         <span class="keyword">const</span> <a class="code" href="classb2_fixture.html">b2Fixture</a>* <a class="code" href="classb2_fixture.html#a0241952461f6f1a04a3c850306390fd2">GetNext</a>() <span class="keyword">const</span>;
<a name="l00147"></a>00147 
<a name="l00150"></a>00150         <span class="keywordtype">void</span>* <a class="code" href="classb2_fixture.html#a57247425e7c859d7653eec417ec83cdc">GetUserData</a>() <span class="keyword">const</span>;
<a name="l00151"></a>00151 
<a name="l00153"></a>00153         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a3db7f89ef4493247d922fe3d96351ad9" title="Set the user data. Use this to store your application specific data.">SetUserData</a>(<span class="keywordtype">void</span>* data);
<a name="l00154"></a>00154 
<a name="l00157"></a>00157         <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#ab875147c7a9df4ff94d224f6aa81a7a9">TestPoint</a>(<span class="keyword">const</span> <a class="code" href="structb2_vec2.html" title="A 2D column vector.">b2Vec2</a>&amp; p) <span class="keyword">const</span>;
<a name="l00158"></a>00158 
<a name="l00162"></a>00162         <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#a614e84f47e8b32b503fa719099ecba79">RayCast</a>(<a class="code" href="structb2_ray_cast_output.html">b2RayCastOutput</a>* output, <span class="keyword">const</span> <a class="code" href="structb2_ray_cast_input.html" title="Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).">b2RayCastInput</a>&amp; input, int32 childIndex) <span class="keyword">const</span>;
<a name="l00163"></a>00163 
<a name="l00167"></a>00167         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#adbfb9b64006abaaa0ca01e6d9e06deea">GetMassData</a>(<a class="code" href="structb2_mass_data.html" title="This holds the mass data computed for a shape.">b2MassData</a>* massData) <span class="keyword">const</span>;
<a name="l00168"></a>00168 
<a name="l00171"></a>00171         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#ad4e1d9323103975c8931d022b952d04a">SetDensity</a>(float32 density);
<a name="l00172"></a>00172 
<a name="l00174"></a>00174         float32 <a class="code" href="classb2_fixture.html#a5deb4acfb464f3dcb668f081a2c44ff4" title="Get the density of this fixture.">GetDensity</a>() <span class="keyword">const</span>;
<a name="l00175"></a>00175 
<a name="l00177"></a>00177         float32 <a class="code" href="classb2_fixture.html#a31253b90b87f1fec7256bba92aeb4645" title="Get the coefficient of friction.">GetFriction</a>() <span class="keyword">const</span>;
<a name="l00178"></a>00178 
<a name="l00181"></a>00181         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#ad0cd91eef5858c8ef1d6b62cc2a34ea2">SetFriction</a>(float32 friction);
<a name="l00182"></a>00182 
<a name="l00184"></a>00184         float32 <a class="code" href="classb2_fixture.html#a6ce4d949ffff6201a117f1e3833953f8" title="Get the coefficient of restitution.">GetRestitution</a>() <span class="keyword">const</span>;
<a name="l00185"></a>00185 
<a name="l00188"></a>00188         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a19c507332e4f7bd04a05f00426f11ee4">SetRestitution</a>(float32 restitution);
<a name="l00189"></a>00189 
<a name="l00193"></a>00193         <span class="keyword">const</span> <a class="code" href="structb2_a_a_b_b.html" title="An axis aligned bounding box.">b2AABB</a>&amp; <a class="code" href="classb2_fixture.html#abdc2a225110310a481a78cdb14000ca7">GetAABB</a>(int32 childIndex) <span class="keyword">const</span>;
<a name="l00194"></a>00194 
<a name="l00196"></a>00196         <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a57485e73a2063060e320c7176676cd5e" title="Dump this fixture to the log file.">Dump</a>(int32 bodyIndex);
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 <span class="keyword">protected</span>:
<a name="l00199"></a>00199 
<a name="l00200"></a>00200         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>;
<a name="l00201"></a>00201         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classb2_world.html">b2World</a>;
<a name="l00202"></a>00202         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classb2_contact.html">b2Contact</a>;
<a name="l00203"></a>00203         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classb2_contact_manager.html">b2ContactManager</a>;
<a name="l00204"></a>00204 
<a name="l00205"></a>00205         <a class="code" href="classb2_fixture.html">b2Fixture</a>();
<a name="l00206"></a>00206 
<a name="l00207"></a>00207         <span class="comment">// We need separation create/destroy functions from the constructor/destructor because</span>
<a name="l00208"></a>00208         <span class="comment">// the destructor cannot access the allocator (no destructor arguments allowed by C++).</span>
<a name="l00209"></a>00209         <span class="keywordtype">void</span> Create(<a class="code" href="classb2_block_allocator.html">b2BlockAllocator</a>* allocator, <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* body, <span class="keyword">const</span> <a class="code" href="structb2_fixture_def.html">b2FixtureDef</a>* def);
<a name="l00210"></a>00210         <span class="keywordtype">void</span> Destroy(<a class="code" href="classb2_block_allocator.html">b2BlockAllocator</a>* allocator);
<a name="l00211"></a>00211 
<a name="l00212"></a>00212         <span class="comment">// These support body activation/deactivation.</span>
<a name="l00213"></a>00213         <span class="keywordtype">void</span> CreateProxies(<a class="code" href="classb2_broad_phase.html">b2BroadPhase</a>* broadPhase, <span class="keyword">const</span> <a class="code" href="structb2_transform.html">b2Transform</a>&amp; xf);
<a name="l00214"></a>00214         <span class="keywordtype">void</span> DestroyProxies(<a class="code" href="classb2_broad_phase.html">b2BroadPhase</a>* broadPhase);
<a name="l00215"></a>00215 
<a name="l00216"></a>00216         <span class="keywordtype">void</span> Synchronize(<a class="code" href="classb2_broad_phase.html">b2BroadPhase</a>* broadPhase, <span class="keyword">const</span> <a class="code" href="structb2_transform.html">b2Transform</a>&amp; xf1, <span class="keyword">const</span> <a class="code" href="structb2_transform.html">b2Transform</a>&amp; xf2);
<a name="l00217"></a>00217 
<a name="l00218"></a>00218         float32 m_density;
<a name="l00219"></a>00219 
<a name="l00220"></a>00220         <a class="code" href="classb2_fixture.html">b2Fixture</a>* m_next;
<a name="l00221"></a>00221         <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* m_body;
<a name="l00222"></a>00222 
<a name="l00223"></a>00223         <a class="code" href="classb2_shape.html">b2Shape</a>* m_shape;
<a name="l00224"></a>00224 
<a name="l00225"></a>00225         float32 m_friction;
<a name="l00226"></a>00226         float32 m_restitution;
<a name="l00227"></a>00227 
<a name="l00228"></a>00228         <a class="code" href="structb2_fixture_proxy.html" title="This proxy is used internally to connect fixtures to the broad-phase.">b2FixtureProxy</a>* m_proxies;
<a name="l00229"></a>00229         int32 m_proxyCount;
<a name="l00230"></a>00230 
<a name="l00231"></a>00231         <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a> m_filter;
<a name="l00232"></a>00232 
<a name="l00233"></a>00233         <span class="keywordtype">bool</span> m_isSensor;
<a name="l00234"></a>00234 
<a name="l00235"></a>00235         <span class="keywordtype">void</span>* m_userData;
<a name="l00236"></a>00236 };
<a name="l00237"></a>00237 
<a name="l00238"></a><a class="code" href="classb2_fixture.html#ab0e1d6bc1c42e6f779e77db408ab2d24">00238</a> <span class="keyword">inline</span> b2Shape::Type <a class="code" href="classb2_fixture.html#ab0e1d6bc1c42e6f779e77db408ab2d24">b2Fixture::GetType</a>()<span class="keyword"> const</span>
<a name="l00239"></a>00239 <span class="keyword"></span>{
<a name="l00240"></a>00240         <span class="keywordflow">return</span> m_shape-&gt;<a class="code" href="classb2_shape.html#a3b6093f16c18f8a877519a29674abca0">GetType</a>();
<a name="l00241"></a>00241 }
<a name="l00242"></a>00242 
<a name="l00243"></a><a class="code" href="classb2_fixture.html#aaa2b73fa212fa53b1c800cccd7a1d31e">00243</a> <span class="keyword">inline</span> <a class="code" href="classb2_shape.html">b2Shape</a>* <a class="code" href="classb2_fixture.html#aaa2b73fa212fa53b1c800cccd7a1d31e">b2Fixture::GetShape</a>()
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245         <span class="keywordflow">return</span> m_shape;
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247 
<a name="l00248"></a>00248 <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classb2_shape.html">b2Shape</a>* <a class="code" href="classb2_fixture.html#aaa2b73fa212fa53b1c800cccd7a1d31e">b2Fixture::GetShape</a>()<span class="keyword"> const</span>
<a name="l00249"></a>00249 <span class="keyword"></span>{
<a name="l00250"></a>00250         <span class="keywordflow">return</span> m_shape;
<a name="l00251"></a>00251 }
<a name="l00252"></a>00252 
<a name="l00253"></a><a class="code" href="classb2_fixture.html#a91758c9dca818ca45f3f6427c7e3fc19">00253</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#a91758c9dca818ca45f3f6427c7e3fc19">b2Fixture::IsSensor</a>()<span class="keyword"> const</span>
<a name="l00254"></a>00254 <span class="keyword"></span>{
<a name="l00255"></a>00255         <span class="keywordflow">return</span> m_isSensor;
<a name="l00256"></a>00256 }
<a name="l00257"></a>00257 
<a name="l00258"></a><a class="code" href="classb2_fixture.html#a5bc271a6e8082e727b053aead1ae86a9">00258</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="structb2_filter.html" title="This holds contact filtering data.">b2Filter</a>&amp; <a class="code" href="classb2_fixture.html#a5bc271a6e8082e727b053aead1ae86a9" title="Get the contact filtering data.">b2Fixture::GetFilterData</a>()<span class="keyword"> const</span>
<a name="l00259"></a>00259 <span class="keyword"></span>{
<a name="l00260"></a>00260         <span class="keywordflow">return</span> m_filter;
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262 
<a name="l00263"></a><a class="code" href="classb2_fixture.html#a57247425e7c859d7653eec417ec83cdc">00263</a> <span class="keyword">inline</span> <span class="keywordtype">void</span>* <a class="code" href="classb2_fixture.html#a57247425e7c859d7653eec417ec83cdc">b2Fixture::GetUserData</a>()<span class="keyword"> const</span>
<a name="l00264"></a>00264 <span class="keyword"></span>{
<a name="l00265"></a>00265         <span class="keywordflow">return</span> m_userData;
<a name="l00266"></a>00266 }
<a name="l00267"></a>00267 
<a name="l00268"></a><a class="code" href="classb2_fixture.html#a3db7f89ef4493247d922fe3d96351ad9">00268</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a3db7f89ef4493247d922fe3d96351ad9" title="Set the user data. Use this to store your application specific data.">b2Fixture::SetUserData</a>(<span class="keywordtype">void</span>* data)
<a name="l00269"></a>00269 {
<a name="l00270"></a>00270         m_userData = data;
<a name="l00271"></a>00271 }
<a name="l00272"></a>00272 
<a name="l00273"></a><a class="code" href="classb2_fixture.html#a9d6536ef274d768e86ab0a8330921535">00273</a> <span class="keyword">inline</span> <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* <a class="code" href="classb2_fixture.html#a9d6536ef274d768e86ab0a8330921535">b2Fixture::GetBody</a>()
<a name="l00274"></a>00274 {
<a name="l00275"></a>00275         <span class="keywordflow">return</span> m_body;
<a name="l00276"></a>00276 }
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classb2_body.html" title="A rigid body. These are created via b2World::CreateBody.">b2Body</a>* <a class="code" href="classb2_fixture.html#a9d6536ef274d768e86ab0a8330921535">b2Fixture::GetBody</a>()<span class="keyword"> const</span>
<a name="l00279"></a>00279 <span class="keyword"></span>{
<a name="l00280"></a>00280         <span class="keywordflow">return</span> m_body;
<a name="l00281"></a>00281 }
<a name="l00282"></a>00282 
<a name="l00283"></a><a class="code" href="classb2_fixture.html#a0241952461f6f1a04a3c850306390fd2">00283</a> <span class="keyword">inline</span> <a class="code" href="classb2_fixture.html">b2Fixture</a>* <a class="code" href="classb2_fixture.html#a0241952461f6f1a04a3c850306390fd2">b2Fixture::GetNext</a>()
<a name="l00284"></a>00284 {
<a name="l00285"></a>00285         <span class="keywordflow">return</span> m_next;
<a name="l00286"></a>00286 }
<a name="l00287"></a>00287 
<a name="l00288"></a>00288 <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classb2_fixture.html">b2Fixture</a>* <a class="code" href="classb2_fixture.html#a0241952461f6f1a04a3c850306390fd2">b2Fixture::GetNext</a>()<span class="keyword"> const</span>
<a name="l00289"></a>00289 <span class="keyword"></span>{
<a name="l00290"></a>00290         <span class="keywordflow">return</span> m_next;
<a name="l00291"></a>00291 }
<a name="l00292"></a>00292 
<a name="l00293"></a><a class="code" href="classb2_fixture.html#ad4e1d9323103975c8931d022b952d04a">00293</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#ad4e1d9323103975c8931d022b952d04a">b2Fixture::SetDensity</a>(float32 density)
<a name="l00294"></a>00294 {
<a name="l00295"></a>00295         b2Assert(b2IsValid(density) &amp;&amp; density &gt;= 0.0f);
<a name="l00296"></a>00296         m_density = density;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298 
<a name="l00299"></a><a class="code" href="classb2_fixture.html#a5deb4acfb464f3dcb668f081a2c44ff4">00299</a> <span class="keyword">inline</span> float32 <a class="code" href="classb2_fixture.html#a5deb4acfb464f3dcb668f081a2c44ff4" title="Get the density of this fixture.">b2Fixture::GetDensity</a>()<span class="keyword"> const</span>
<a name="l00300"></a>00300 <span class="keyword"></span>{
<a name="l00301"></a>00301         <span class="keywordflow">return</span> m_density;
<a name="l00302"></a>00302 }
<a name="l00303"></a>00303 
<a name="l00304"></a><a class="code" href="classb2_fixture.html#a31253b90b87f1fec7256bba92aeb4645">00304</a> <span class="keyword">inline</span> float32 <a class="code" href="classb2_fixture.html#a31253b90b87f1fec7256bba92aeb4645" title="Get the coefficient of friction.">b2Fixture::GetFriction</a>()<span class="keyword"> const</span>
<a name="l00305"></a>00305 <span class="keyword"></span>{
<a name="l00306"></a>00306         <span class="keywordflow">return</span> m_friction;
<a name="l00307"></a>00307 }
<a name="l00308"></a>00308 
<a name="l00309"></a><a class="code" href="classb2_fixture.html#ad0cd91eef5858c8ef1d6b62cc2a34ea2">00309</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#ad0cd91eef5858c8ef1d6b62cc2a34ea2">b2Fixture::SetFriction</a>(float32 friction)
<a name="l00310"></a>00310 {
<a name="l00311"></a>00311         m_friction = friction;
<a name="l00312"></a>00312 }
<a name="l00313"></a>00313 
<a name="l00314"></a><a class="code" href="classb2_fixture.html#a6ce4d949ffff6201a117f1e3833953f8">00314</a> <span class="keyword">inline</span> float32 <a class="code" href="classb2_fixture.html#a6ce4d949ffff6201a117f1e3833953f8" title="Get the coefficient of restitution.">b2Fixture::GetRestitution</a>()<span class="keyword"> const</span>
<a name="l00315"></a>00315 <span class="keyword"></span>{
<a name="l00316"></a>00316         <span class="keywordflow">return</span> m_restitution;
<a name="l00317"></a>00317 }
<a name="l00318"></a>00318 
<a name="l00319"></a><a class="code" href="classb2_fixture.html#a19c507332e4f7bd04a05f00426f11ee4">00319</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#a19c507332e4f7bd04a05f00426f11ee4">b2Fixture::SetRestitution</a>(float32 restitution)
<a name="l00320"></a>00320 {
<a name="l00321"></a>00321         m_restitution = restitution;
<a name="l00322"></a>00322 }
<a name="l00323"></a>00323 
<a name="l00324"></a><a class="code" href="classb2_fixture.html#ab875147c7a9df4ff94d224f6aa81a7a9">00324</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#ab875147c7a9df4ff94d224f6aa81a7a9">b2Fixture::TestPoint</a>(<span class="keyword">const</span> <a class="code" href="structb2_vec2.html" title="A 2D column vector.">b2Vec2</a>&amp; p)<span class="keyword"> const</span>
<a name="l00325"></a>00325 <span class="keyword"></span>{
<a name="l00326"></a>00326         <span class="keywordflow">return</span> m_shape-&gt;<a class="code" href="classb2_shape.html#a6ac968e403e2d93e8ae46d728a2e50fa">TestPoint</a>(m_body-&gt;<a class="code" href="classb2_body.html#adaaebca750d0bda56a543884adc5f519">GetTransform</a>(), p);
<a name="l00327"></a>00327 }
<a name="l00328"></a>00328 
<a name="l00329"></a><a class="code" href="classb2_fixture.html#a614e84f47e8b32b503fa719099ecba79">00329</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classb2_fixture.html#a614e84f47e8b32b503fa719099ecba79">b2Fixture::RayCast</a>(<a class="code" href="structb2_ray_cast_output.html">b2RayCastOutput</a>* output, <span class="keyword">const</span> <a class="code" href="structb2_ray_cast_input.html" title="Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).">b2RayCastInput</a>&amp; input, int32 childIndex)<span class="keyword"> const</span>
<a name="l00330"></a>00330 <span class="keyword"></span>{
<a name="l00331"></a>00331         <span class="keywordflow">return</span> m_shape-&gt;<a class="code" href="classb2_shape.html#aee53a926f4fe64cd03693f6211ef6335">RayCast</a>(output, input, m_body-&gt;<a class="code" href="classb2_body.html#adaaebca750d0bda56a543884adc5f519">GetTransform</a>(), childIndex);
<a name="l00332"></a>00332 }
<a name="l00333"></a>00333 
<a name="l00334"></a><a class="code" href="classb2_fixture.html#adbfb9b64006abaaa0ca01e6d9e06deea">00334</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classb2_fixture.html#adbfb9b64006abaaa0ca01e6d9e06deea">b2Fixture::GetMassData</a>(<a class="code" href="structb2_mass_data.html" title="This holds the mass data computed for a shape.">b2MassData</a>* massData)<span class="keyword"> const</span>
<a name="l00335"></a>00335 <span class="keyword"></span>{
<a name="l00336"></a>00336         m_shape-&gt;<a class="code" href="classb2_shape.html#a61b365526241b47f124789b0309cac69">ComputeMass</a>(massData, m_density);
<a name="l00337"></a>00337 }
<a name="l00338"></a>00338 
<a name="l00339"></a><a class="code" href="classb2_fixture.html#abdc2a225110310a481a78cdb14000ca7">00339</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="structb2_a_a_b_b.html" title="An axis aligned bounding box.">b2AABB</a>&amp; <a class="code" href="classb2_fixture.html#abdc2a225110310a481a78cdb14000ca7">b2Fixture::GetAABB</a>(int32 childIndex)<span class="keyword"> const</span>
<a name="l00340"></a>00340 <span class="keyword"></span>{
<a name="l00341"></a>00341         b2Assert(0 &lt;= childIndex &amp;&amp; childIndex &lt; m_proxyCount);
<a name="l00342"></a>00342         <span class="keywordflow">return</span> m_proxies[childIndex].aabb;
<a name="l00343"></a>00343 }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 17 2011 17:35:55 for Box2D by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
